home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1980 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  38 lines

  1. Path: Norway.EU.net!usenet
  2. From: terjepe@login.eunet.no (Terje Pedersen)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: sas c++ and standard libraries
  5. Date: 25 Jan 1996 19:15:24 GMT
  6. Organization: EUnet Norway
  7. Message-ID: <659.6597T1321T710@login.eunet.no>
  8. References: <892.6593T765T2606@login.eunet.no> <913.6594T956T1110@paralax.demon.co.uk>
  9. NNTP-Posting-Host: pc2.sandvika-pm2-1.eunet.no
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12. >C++ mangles all function names. So, in the file drvbase.(cxx|cpp|cc) you are
  13. >calling the function strncpy(char*, const char*, unsigned int).
  14. >If you had the C function prototype of strncpy() before this call then
  15. >everything would work out fine.
  16.  
  17. >So, make sure, there is a
  18. >extern "C" strncpy(char*, const char*, unsigned int);
  19.  
  20. Yes, I have received mails about:
  21. extern "C" {
  22. #include <string.h>
  23. }
  24. which solves the problem, but thanks anyway!
  25.  
  26. >>It compiles fine with gcc though (and available on my homepage:
  27. >This I don't understand - unless you are using different header files for
  28. >gcc.
  29.  
  30. Yes, appearently it has.
  31.  
  32. >hope this helps,
  33.  
  34. >      Michael
  35.  
  36. TP
  37.  
  38.